<template>
  <div>
     <v-form v-if="isshow" @aa="changeis" @init="init"></v-form>
    <v-list v-else @fa="changeis"></v-list>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import vList from "./components/rolelist.vue";
import vForm from "./components/roleform.vue";
import { reqrolelist } from "../../request/api";
export default {
  components: {
    vList,vForm
  },
  computed: {
    ...mapGetters({}),
  },
  methods: {
    ...mapActions({
    }),
    //进来获取数据
    init(){
      reqrolelist().then((res)=>{
        this.list=res.data.list;
      })
    },
    changeis(){
        this.isshow=!this.isshow
    }
  },
  mounted() {
    this.init()
  },
  props: [],
  data() {
    return {
      isshow:true,
    };
  },
};
</script>
<style lang="less" scoped>

</style>